package sapling.logic.algorithm.pcb.queue;

public class Node<T> {
	private T data;
	private Node<T> next;
	private Node<T> prev;
	private boolean isHead;

	public Node(boolean b) {
		this(null);
		this.isHead = b;
	}

	public Node(T data) {
		this(null, data, null);
	}

	public Node(Node<T> prev, T data, Node<T> next) {
		this.prev = prev;
		this.data = data;
		this.next = next;
		this.isHead = false;
	}

	public T getData() {
		return data;
	}

	public Node<T> getNext() {
		return next;
	}

	public void setNext(Node<T> next) {
		this.next = next;
	}

	public Node<T> getPrev() {
		return prev;
	}

	public void setPrev(Node<T> prev) {
		this.prev = prev;
	}

	public boolean isHead() {
		return isHead;
	}
}
